package org.cfx.gift.client;

import org.cfx.gift.client.fallback.AuthClientFallBack;
import org.cfx.gift.domain.LoginUser;
import org.cfx.gift.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author RTX 9090
 */
@FeignClient(value = "gift-auth",fallback = AuthClientFallBack.class)
public interface AuthClient {
    //http远程调用
    @PutMapping("/loginUser")
    AjaxResult addOrUpdate(@RequestBody LoginUser loginUser);
    //获取用户
    @GetMapping("/loginUser/{username}")
    AjaxResult get(@PathVariable("username")String username);
}
